---
import '@/styles/global.css'
import '@/styles/docsearch.scss'
import 'animate.css'
import MyHeader from '@/components/my-header.vue'

interface Props {
  title: string // 标题
  description: string // 描述
  gradientHeader?: boolean // header 是否背景渐变
}

const { title, description, gradientHeader } = Astro.props
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="description" content={description} />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="generator" content={Astro.generator} />
    <link rel="stylesheet" href={`/static/css/prism-one-light.css`} />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
    <script src="/config.js" is:inline></script>
    <script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3" is:inline></script>
    <title>{title}</title>
  </head>
  <body>
    <MyHeader gradientHeader={gradientHeader || false} client:visible />
    <main class={gradientHeader ? 'gradient-body' : 'normal-body'}>
      <slot />
    </main>
  </body>
</html>

<style lang="scss">
  .gradient-body {
    // @apply h-dvh overflow-y-auto;
  }
  .normal-body {
    // height: calc(100vh - 5rem);
    @apply mt-20;
  }
</style>
